/**
 * @author Xueying Zhang 20175227
 * @date 2019/4/29 16:32.
 */
class CharacterOfXiyouji{
    private float height;
    private float weight;
    private String head;
    private String ear;
    void speak(String s){
        setHead("歪着头");
        System.out.println(s);
    }

    public float getHeight() {
        return height;
    }

    public void setHeight(float height) {
        this.height = height;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public String getHead() {
        return head;
    }

    public void setHead(String head) {
        this.head = head;
    }

    public String getEar() {
        return ear;
    }

    public void setEar(String ear) {
        this.ear = ear;
    }
}
public class Example4_3{
    public static void main(String args[]){
        CharacterOfXiyouji zhubajie,sunwukong;
        zhubajie = new CharacterOfXiyouji();
        sunwukong = new CharacterOfXiyouji();
        zhubajie.setHeight(1.80f);
        zhubajie.setHead("大头");
        zhubajie.setEar("一双大耳朵");
        sunwukong.setHeight(1.62f);
        sunwukong.setWeight(1000f);
        sunwukong.setHead("秀发飘飘");
        System.out.println("zhubajie的身高"+ zhubajie.getHeight());
        System.out.println("zhubajie的头"+ zhubajie.getHead());
        System.out.println("sunwukong的重量"+ sunwukong.getHeight());
        System.out.println("sunwukong.head"+ sunwukong.getHead());
        zhubajie.speak("俺老猪我想娶媳妇");
        System.out.println("zhubajie现在的头："+ zhubajie.getHead());
        sunwukong.speak("老孙我重1000斤，我想骗猪八戒背我");
        System.out.println("sunwukong现在的头:"+ sunwukong.getHead());
    }
}
